package com.epfresh.bean;

import com.epfresh.global.CartHelper;

import java.util.List;

/**
 * Created by zhaozhenqiang on 2017/5/27.
 */

public class ListSecondKill {


    /**
     * content : [{"product":{"weight":1,"accountId":564,"deposit":null,"pack":"1公斤/袋","priceUnit":"1.0元/袋","type":1,"packageContainer":"袋","promotionId":75,"id":5401,"title":"河虾河虾河虾(苹果)(三级)","level":"三级","description":"测试","name":{"id":407,"alias":"","name":"河虾","code":"0901020200000","type":2},"tags":[{"color":"#fc0a2e","name":"特价"}],"species":null,"lastSnapshotId":19109,"createdTime":"2017-05-26 09:42:00","status":1,"pluckingTime":"2017-05-26 00:00:00","categoryType":1,"categoryId":90,"modifiedTime":"2017-05-26 10:49:47","origin":"河虾","barcode":"0901020000002","number":"01170526652883","moq":1,"variety":"河虾","nameId":407,"packageSize":1,"unit":"袋","price":1,"thumbnail":"http://7xpf2j.com2.z0.glb.qiniucdn.com/2017%2F5%2F26%2F72d430c1d4914374863a9d72c31ee8b4.jpg-MAINPRODUCT","deliveryTime":null,"inventory":1,"topCategoryId":5,"baseName":"河虾-河虾-三级-苹果-河虾-1公斤/袋","brand":"苹果","incr":1,"storeId":133,"packageUnit":"公斤","chargeUnit":"袋"},"price":11111111,"promotionItemId":673,"status":3,"promotionMarkUrl":""},{"product":{"weight":1,"accountId":564,"deposit":null,"pack":"1公斤/袋","priceUnit":"1.0元/袋","type":1,"packageContainer":"袋","promotionId":80,"id":5401,"title":"河虾河虾河虾(苹果)(三级)","level":"三级","description":"测试","name":{"id":407,"alias":"","name":"河虾","code":"0901020200000","type":2},"tags":[{"color":"#fc0a2e","name":"特价"}],"species":null,"lastSnapshotId":19109,"createdTime":"2017-05-26 09:42:00","status":1,"pluckingTime":"2017-05-26 00:00:00","categoryType":1,"categoryId":90,"modifiedTime":"2017-05-26 10:49:47","origin":"河虾","barcode":"0901020000002","number":"01170526652883","moq":1,"variety":"河虾","nameId":407,"packageSize":1,"unit":"袋","price":1,"thumbnail":"http://7xpf2j.com2.z0.glb.qiniucdn.com/2017%2F5%2F26%2F72d430c1d4914374863a9d72c31ee8b4.jpg-MAINPRODUCT","deliveryTime":null,"inventory":1,"topCategoryId":5,"baseName":"河虾-河虾-三级-苹果-河虾-1公斤/袋","brand":"苹果","incr":1,"storeId":133,"packageUnit":"公斤","chargeUnit":"袋"},"price":0,"promotionItemId":687,"status":3,"promotionMarkUrl":""}]
     * last : true
     * totalElements : 2
     * number : 0
     * size : 10
     */
    private String responseTime;

    public String getResponseTime() {
        return responseTime;
    }

    public void setResponseTime(String responseTime) {
        this.responseTime = responseTime;
    }

    private boolean last;
    private int totalElements;
    private int number;
    private int size;
    private List<ContentBean> content;

    public boolean isLast() {
        return last;
    }

    public void setLast(boolean last) {
        this.last = last;
    }

    public int getTotalElements() {
        return totalElements;
    }

    public void setTotalElements(int totalElements) {
        this.totalElements = totalElements;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public List<ContentBean> getContent() {
        return content;
    }

    public void setContent(List<ContentBean> content) {
        this.content = content;
    }

    public static class ContentBean {
        /**
         * product : {"weight":1,"accountId":564,"deposit":null,"pack":"1公斤/袋","priceUnit":"1.0元/袋","type":1,"packageContainer":"袋","promotionId":75,"id":5401,"title":"河虾河虾河虾(苹果)(三级)","level":"三级","description":"测试","name":{"id":407,"alias":"","name":"河虾","code":"0901020200000","type":2},"tags":[{"color":"#fc0a2e","name":"特价"}],"species":null,"lastSnapshotId":19109,"createdTime":"2017-05-26 09:42:00","status":1,"pluckingTime":"2017-05-26 00:00:00","categoryType":1,"categoryId":90,"modifiedTime":"2017-05-26 10:49:47","origin":"河虾","barcode":"0901020000002","number":"01170526652883","moq":1,"variety":"河虾","nameId":407,"packageSize":1,"unit":"袋","price":1,"thumbnail":"http://7xpf2j.com2.z0.glb.qiniucdn.com/2017%2F5%2F26%2F72d430c1d4914374863a9d72c31ee8b4.jpg-MAINPRODUCT","deliveryTime":null,"inventory":1,"topCategoryId":5,"baseName":"河虾-河虾-三级-苹果-河虾-1公斤/袋","brand":"苹果","incr":1,"storeId":133,"packageUnit":"公斤","chargeUnit":"袋"}
         * price : 11111111
         * promotionItemId : 673
         * status : 3
         * promotionMarkUrl :
         */
        public String getIdPlus() {
            if (promotionItemId != null ){
                return getProduct().getId()+"|"+promotionItemId;
            }
            return getProduct().getId();
        }

        private String specId;
        private int isAcceptOrders;
        private String totalQuantity;
        private String promotionId;
        private double count;
        private ProductBean product;
        private Double price;
        private String promotionItemId;
        private int status;
        private String promotionMarkUrl;
        private double quantityPerAccount;

        public String getSpecId() {
            return specId;
        }

        public void setSpecId(String specId) {
            this.specId = specId;
        }

        public int getIsAcceptOrders() {
            return isAcceptOrders;
        }

        public void setIsAcceptOrders(int isAcceptOrders) {
            this.isAcceptOrders = isAcceptOrders;
        }

        public String getTotalQuantity() {
            return totalQuantity;
        }

        public void setTotalQuantity(String totalQuantity) {
            this.totalQuantity = totalQuantity;
        }

        public String getPromotionId() {
            return promotionId;
        }

        public void setPromotionId(String promotionId) {
            this.promotionId = promotionId;
        }

        public double getQuantityPerAccount() {
            return quantityPerAccount;
        }

        public void setQuantityPerAccount(double quantityPerAccount) {
            this.quantityPerAccount = quantityPerAccount;
        }

        public double getCount() {
            return count;
        }

        public void setCount(double count) {
            this.count = count;
        }

        public ProductBean getProduct() {
            return product;
        }

        public void setProduct(ProductBean product) {
            this.product = product;
        }

        public Double getPrice() {
            return price;
        }

        public void setPrice(Double price) {
            this.price = price;
        }

        public String getPromotionItemId() {
            return promotionItemId;
        }

        public void setPromotionItemId(String promotionItemId) {
            this.promotionItemId = promotionItemId;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public String getPromotionMarkUrl() {
            return promotionMarkUrl;
        }

        public void setPromotionMarkUrl(String promotionMarkUrl) {
            this.promotionMarkUrl = promotionMarkUrl;
        }

        public static class ProductBean implements CartHelper.CartHelperTools {

            int isAcceptOrders;

            public int getIsAcceptOrders() {
                return isAcceptOrders;
            }

            public void setIsAcceptOrders(int isAcceptOrders) {
                this.isAcceptOrders = isAcceptOrders;
            }

            private Double weight;
            private String accountId;
            private Object deposit;
            private String pack;
            private String priceUnit;
            private int type;
            private String packageContainer;
            private String promotionId;
            private String id;
            private String title;
            private String level;
            private String description;
            private String name;
            private String species;
            private String lastSnapshotId;
            private String createdTime;
            private int status;
            private String pluckingTime;
            private int categoryType;
            private String categoryId;
            private String modifiedTime;
            private String origin;
            private String barcode;
            private String number;
            private double moq;
            private String variety;
            private String nameId;
            private String packageSize;
            private String unit;
            private Double price;
            private String thumbnail;
            private String deliveryTime;
            private double inventory;
            private int topCategoryId;
            private String baseName;
            private String brand;
            private double incr;
            private String storeId;
            private String packageUnit;
            private String chargeUnit;
            private List<HomeCommTag> tags;
            private String saleDeadline;
            private String productId;
            private int merchantId;

            private ProductParseDtoBean1 productParseDto;
            private ProductSpecPrice1 productSpecPrice;

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public ProductParseDtoBean1 getProductParseDto() {
                return productParseDto;
            }

            public void setProductParseDto(ProductParseDtoBean1 productParseDto) {
                this.productParseDto = productParseDto;
            }

            public ProductSpecPrice1 getProductSpecPrice() {
                return productSpecPrice;
            }

            public void setProductSpecPrice(ProductSpecPrice1 productSpecPrice) {
                this.productSpecPrice = productSpecPrice;
            }

            public String getSaleDeadline() {
                return saleDeadline;
            }

            public void setSaleDeadline(String saleDeadline) {
                this.saleDeadline = saleDeadline;
            }

            public String getProductId() {
                return productId;
            }

            public void setProductId(String productId) {
                this.productId = productId;
            }

            public int getMerchantId() {
                return merchantId;
            }

            public void setMerchantId(int merchantId) {
                this.merchantId = merchantId;
            }

            public Double getWeight() {
                return weight;
            }

            public void setWeight(Double weight) {
                this.weight = weight;
            }

            public String getAccountId() {
                return accountId;
            }

            public void setAccountId(String accountId) {
                this.accountId = accountId;
            }

            public Object getDeposit() {
                return deposit;
            }

            public void setDeposit(Object deposit) {
                this.deposit = deposit;
            }

            public String getPack() {
                return pack;
            }

            public void setPack(String pack) {
                this.pack = pack;
            }

            public String getPriceUnit() {
                return priceUnit;
            }

            public void setPriceUnit(String priceUnit) {
                this.priceUnit = priceUnit;
            }

            public int getType() {
                return type;
            }

            public void setType(int type) {
                this.type = type;
            }

            public String getPackageContainer() {
                return packageContainer;
            }

            public void setPackageContainer(String packageContainer) {
                this.packageContainer = packageContainer;
            }

            public String getPromotionId() {
                return promotionId;
            }

            public void setPromotionId(String promotionId) {
                this.promotionId = promotionId;
            }

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getTitle() {
                return title;
            }

            public void setTitle(String title) {
                this.title = title;
            }

            public String getLevel() {
                return level;
            }

            public void setLevel(String level) {
                this.level = level;
            }

            public String getDescription() {
                return description;
            }

            public void setDescription(String description) {
                this.description = description;
            }

            public Object getSpecies() {
                return species;
            }

            public void setSpecies(String species) {
                this.species = species;
            }

            public String getLastSnapshotId() {
                return lastSnapshotId;
            }

            public void setLastSnapshotId(String lastSnapshotId) {
                this.lastSnapshotId = lastSnapshotId;
            }

            public String getCreatedTime() {
                return createdTime;
            }

            public void setCreatedTime(String createdTime) {
                this.createdTime = createdTime;
            }

            public int getStatus() {
                return status;
            }

            public void setStatus(int status) {
                this.status = status;
            }

            public String getPluckingTime() {
                return pluckingTime;
            }

            public void setPluckingTime(String pluckingTime) {
                this.pluckingTime = pluckingTime;
            }

            public int getCategoryType() {
                return categoryType;
            }

            public void setCategoryType(int categoryType) {
                this.categoryType = categoryType;
            }

            public String getCategoryId() {
                return categoryId;
            }

            public void setCategoryId(String categoryId) {
                this.categoryId = categoryId;
            }

            public String getModifiedTime() {
                return modifiedTime;
            }

            public void setModifiedTime(String modifiedTime) {
                this.modifiedTime = modifiedTime;
            }

            public String getOrigin() {
                return origin;
            }

            public void setOrigin(String origin) {
                this.origin = origin;
            }

            public String getBarcode() {
                return barcode;
            }

            public void setBarcode(String barcode) {
                this.barcode = barcode;
            }

            public String getNumber() {
                return number;
            }

            public void setNumber(String number) {
                this.number = number;
            }

            public double getMoq() {
                return moq;
            }

            public void setMoq(double moq) {
                this.moq = moq;
            }

            public String getVariety() {
                return variety;
            }

            public void setVariety(String variety) {
                this.variety = variety;
            }

            public String getNameId() {
                return nameId;
            }

            public void setNameId(String nameId) {
                this.nameId = nameId;
            }

            public String getPackageSize() {
                return packageSize;
            }

            public void setPackageSize(String packageSize) {
                this.packageSize = packageSize;
            }

            public String getUnit() {
                return unit;
            }

            public void setUnit(String unit) {
                this.unit = unit;
            }

            public Double getPrice() {
                return price;
            }

            public void setPrice(Double price) {
                this.price = price;
            }

            public String getThumbnail() {
                return thumbnail;
            }

            public void setThumbnail(String thumbnail) {
                this.thumbnail = thumbnail;
            }

            public Object getDeliveryTime() {
                return deliveryTime;
            }

            public void setDeliveryTime(String deliveryTime) {
                this.deliveryTime = deliveryTime;
            }

            public double getInventory() {
                return inventory;
            }

            public void setInventory(double inventory) {
                this.inventory = inventory;
            }

            public int getTopCategoryId() {
                return topCategoryId;
            }

            public void setTopCategoryId(int topCategoryId) {
                this.topCategoryId = topCategoryId;
            }

            public String getBaseName() {
                return baseName;
            }

            public void setBaseName(String baseName) {
                this.baseName = baseName;
            }

            public String getBrand() {
                return brand;
            }

            public void setBrand(String brand) {
                this.brand = brand;
            }

            public double getIncr() {
                return incr;
            }

            public void setIncr(double incr) {
                this.incr = incr;
            }

            public String getStoreId() {
                return storeId;
            }

            public void setStoreId(String storeId) {
                this.storeId = storeId;
            }

            public String getPackageUnit() {
                return packageUnit;
            }

            public void setPackageUnit(String packageUnit) {
                this.packageUnit = packageUnit;
            }

            public String getChargeUnit() {
                return chargeUnit;
            }

            public void setChargeUnit(String chargeUnit) {
                this.chargeUnit = chargeUnit;
            }

            public List<HomeCommTag> getTags() {
                return tags;
            }

            public void setTags(List<HomeCommTag> tags) {
                this.tags = tags;
            }

            @Override
            public String getUniqueKey() {
                String key = id;
                if (promotionId != null){
                    key += "|"+promotionId;
                }
                return key;
            }

            @Override
            public void setCount(double cnt) {


            }


            public static class ProductParseDtoBean1 {

                private String description;
                private int storeId;
                private int categoryiId;
                private String createdTime;
                private int id;
                private int categoryiiId;
                private String modifiedTime;
                private int merchantId;
                private int type;
                private String title;
                private String number;
                private int auditStatus;
                private boolean shareInventory;
                private int categoryiiiId;
                private boolean isShareInventory;

                public String getDescription() {
                    return description;
                }

                public void setDescription(String description) {
                    this.description = description;
                }

                public int getStoreId() {
                    return storeId;
                }

                public void setStoreId(int storeId) {
                    this.storeId = storeId;
                }

                public int getCategoryiId() {
                    return categoryiId;
                }

                public void setCategoryiId(int categoryiId) {
                    this.categoryiId = categoryiId;
                }

                public String getCreatedTime() {
                    return createdTime;
                }

                public void setCreatedTime(String createdTime) {
                    this.createdTime = createdTime;
                }

                public int getId() {
                    return id;
                }

                public void setId(int id) {
                    this.id = id;
                }

                public int getCategoryiiId() {
                    return categoryiiId;
                }

                public void setCategoryiiId(int categoryiiId) {
                    this.categoryiiId = categoryiiId;
                }

                public String getModifiedTime() {
                    return modifiedTime;
                }

                public void setModifiedTime(String modifiedTime) {
                    this.modifiedTime = modifiedTime;
                }

                public int getMerchantId() {
                    return merchantId;
                }

                public void setMerchantId(int merchantId) {
                    this.merchantId = merchantId;
                }

                public int getType() {
                    return type;
                }

                public void setType(int type) {
                    this.type = type;
                }

                public String getTitle() {
                    return title;
                }

                public void setTitle(String title) {
                    this.title = title;
                }

                public String getNumber() {
                    return number;
                }

                public void setNumber(String number) {
                    this.number = number;
                }

                public int getAuditStatus() {
                    return auditStatus;
                }

                public void setAuditStatus(int auditStatus) {
                    this.auditStatus = auditStatus;
                }

                public boolean isShareInventory() {
                    return shareInventory;
                }

                public void setShareInventory(boolean shareInventory) {
                    this.shareInventory = shareInventory;
                }

                public int getCategoryiiiId() {
                    return categoryiiiId;
                }

                public void setCategoryiiiId(int categoryiiiId) {
                    this.categoryiiiId = categoryiiiId;
                }

                public boolean isIsShareInventory() {
                    return isShareInventory;
                }

                public void setIsShareInventory(boolean isShareInventory) {
                    this.isShareInventory = isShareInventory;
                }
            }

            public static class ProductSpecPrice1 {

                private String moq;
                private String price;

                public String getMoq() {
                    return moq;
                }

                public void setMoq(String moq) {
                    this.moq = moq;
                }

                public String getPrice() {
                    return price;
                }

                public void setPrice(String price) {
                    this.price = price;
                }
            }
        }
    }
}
